
import { createSlice } from '@reduxjs/toolkit';


export const dataSlice = createSlice({
    name:'data',
    initialState:{
        count:1000
    },
    reducers:{
        add(state){
            console.log(state)
            state.count+=1;
        }
    }
})

export const { add } = dataSlice.actions;
export const dataState = (state:any)=>state.data
export default dataSlice.reducer